<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="js/vue.min.js"></script>
<style type="text/css">
.red{color:red;}
.orange{color:orange;}
.yellow{color:yellow;}
</style>
</head>
<body>
<div id="myApp">
<h3>v-bind数据绑定</h3>
{{5*8}}<br><br>
{{ message.split('').reverse().join('') }}<br><br>
{{onOff ? "yes" : "no"}}<br><br>
<a v-bind:href="url" target="_blank">百度</a>
<h3>v-bind的缩写</h3>
<a :href="url" :target="target">百度</a>
<!-- 绑定属性 -->
<h3>给元素添加 id 属性</h3>
<div v-bind:id="id">{{message}}</div><br>
<div v-bind:class="'list-'+id">{{message}}</div>
</div>
<script type="text/javascript">
var myApp = new Vue({
	el:"#myApp",
	data:{
		onOff:true,
		message:'信息',
		curColor:'red',
		target:'_blank',
		url:'http://www.baidu.com',
		id:2
	}
});
</script>
</body>
</html>